Ext.ns('NewStudents');
/**
 * 新生入学管理main
 */
NewStudents.NewStudentsMain = Ext.extend(Ext.Panel, {
		frame : true,
		layout : "border",
		border : false,
		initComponent : function() {
			this.items = [{
				title:'无学籍学生列表',
				region:'center',
				iconCls:'application_view_list',
				xtype:'NewStudentsNoEnrollmentList'
			},{
				title:'新生录入校验',
				iconCls : 'arrow_switch_bluegreen',
				width:'35%',
				region:'east',
				autoHeight:true,
				xtype:'NewStudentsAddPanel'
			}];
			NewStudents.NewStudentsMain.superclass.initComponent.call(this);
		}
});

NewStudents.AddAndImporPanel = Ext.extend(Ext.Panel, {
	frame : true,
	layout : "form",
	border : false,
	initComponent : function() {
		this.items = [{
			title:'新生录入校验',
			iconCls:'add',
			autoHeight:true,
			xtype:'NewStudentsAddPanel'
		},{},{
			title:'导入',
			iconCls : 'css_go',
			autoHeight:true,
			xtype:'ImportPanel'
		}];
		NewStudents.AddAndImporPanel.superclass.initComponent.call(this);
	}
});
Ext.reg('AddAndImporPanel', NewStudents.AddAndImporPanel);

/**
 * 导入录取信息
 */
NewStudents.ImportPanel = Ext.extend(Ext.Panel, {
	frame : true,
	buttonAlign : 'center',
	modal : true,
	initComponent : function() {
		this.items = [UpForm2];
		this.buttons=[{
			text:'添加',
			iconCls : 'save'
			
		},'-',{
			text:'重置',
			iconCls : 'refresh'
		}]
		NewStudents.ImportPanel.superclass.initComponent.call(this);
	}
	 
});
Ext.reg('ImportPanel', NewStudents.ImportPanel);
/**
 * 新生没有学籍信息列表
 */
NewStudents.NewStudentsNoEnrollmentList = Ext.extend(Ext.ux.grid.CollectGrid, {
	//url : 'date/latgrid.json',
	//urlDeleteData : '',
	store: store,
	sortType : 'desc',
	isSingleSelect : false,
	pageCloseButton:false,
	autoScroll : true,
	viewConfig : {
		forceFit : true
	},
	CM_JR_Record :  [{
			dataIndex : "stuName",
			header : "姓名",
			align : 'center',
			sortable : true
		},{
			dataIndex : "stuSex",
			header : "性别",
			align : 'center',
			sortable : true
		
		},{
			dataIndex : "No",
			header : "身份证号",
			sortable : true
		},{
			dataIndex : "c",
			header : "编辑",
			align : 'center',
			sortable : true,
			renderer :  function(value) {
						return  '<img src="images/icons/edit3.gif"/>';
			}
		}],
	toolbarConfig : [{//工具栏信息
			xtype : 'tbspacer',
			width : 5
		}, {
			xtype : 'label',
			text : '姓名:',
			width : 30
		}, {
			xtype : 'textfield',
			width : 100
		},{
			xtype : 'button',
			text : '查询',
			iconCls : 'select',
			handler : function() {
			}
		}, {
			xtype : 'button',
			text : '重置',
			iconCls : 'refresh',
			handler : function() {
			}
		},  '->',{
			text: '删除',
			iconCls : 'delete',
			handler : function(){
			}
		},{
			text:'添加学籍',
			iconCls:'add'
		}]
});
Ext.reg('NewStudentsNoEnrollmentList', NewStudents.NewStudentsNoEnrollmentList);

/**
 * 
 */
NewStudents.NewStudentsAddPanel = Ext.extend(Ext.Panel, {
	frame : true,
	buttonAlign : 'center',
	modal : true,
	initComponent : function() {
		this.items = [{
			xtype : "form",
			labelWidth : 60,
			layout : 'form',
			items : [{
					layout : 'column',
					items : [{
						columnWidth:0.5,
						layout: 'form',  
						items: [{  
		                    fieldLabel: '学籍号',  
		                    name: 'name',  
		                    anchor : '95%',
		                    xtype: 'textfield'  
		                },{
							xtype : 'combo',
							mode : 'local',
							fieldLabel : '性别',
							name : 'zf.ztype',
							anchor : '95%',
							displayField : 'name',
							valueField : 'value',
							forceSelection : true,
							triggerAction : 'all',
							value : '',
							store : new Ext.data.JsonStore({
								fields : ['name', 'value'],
								data : [{
									name : '男',
									value : 'A'
								}, {
									name : '女',
									value : 'B'
								}]
								})
						}]  
					},{
						columnWidth:0.5,
						layout: 'form',  
						items: [{  
		                    fieldLabel: '姓名',  
		                    name: 'name',  
		                    anchor : '95%',
		                    xtype: 'textfield'  
		                }]  
					},{
						columnWidth:1,
						layout: 'form',  
						items: [{  
		                    fieldLabel: '身份证号',  
		                    name: 'name',  
		                    anchor : '98%',
		                    xtype: 'textfield'  
		                }]  
					}]
				
			}]
		}];
		this.buttons=[{
			text:'校验',
			iconCls : 'arrow_switch_bluegreen',
			handler:function(){
				new Ext.Window({
					buttonAlign : 'center',
					width:300,
					height:100,
					title:'校验结果信息',
					html:'<br><h2><center>校验后无此学生学籍,是否建立?</center></h2>',
					buttons:[{
						text:'建立',
						iconCls:'add',
						handler:function(){
							new NewStudents.NewStudentsAddXJWin().show();
						}
					},{
						text:'暂存',
						handler:function(){
							
						}
					},{
						text:'关闭',
						handler:function(){
							
						}
					}]
				}).show();
			}
		},'-',{
			text:'重置',
			iconCls : 'refresh'
		}]
		NewStudents.NewStudentsAddPanel.superclass.initComponent.call(this);
	}
	 
});

function showResult(){
};
Ext.reg('NewStudentsAddPanel', NewStudents.NewStudentsAddPanel);